<?php

	$TEMP->set_file(array('handle' => DIR_IFRAME_VIEW . 'printStudentSeach.html'));
	
	$studList = $STUD->arraySearchStudentInformation($activeYear, $_GET);
	if ( !empty($studList) ) {
		$TEMP->set_block('handle',  'students', 'studentsRow');
		$numCount 	= 1;
		foreach($studList as $studListField => $studListValue) {
			
			$studID 		= $studListValue['stud_idPK'];
			$courseID 		= $studListValue['course_idFK'];
			
			$semActiveFreshmen	= $STUD->getSemesterEnrollmentActive($studID);
			$currentSemester	= $DSC->getSemesterLabel($semActiveFreshmen['sem_linker_idFK']);
			$takeSectionDesc	= $STUD->getStudSectionDesc($studID, $courseID, $semActiveFreshmen['sem_linker_idFK']);
			
			$TEMP->set_var(array('stud_id' 		=> $studListValue['stud_idPK'],
								 'stud_no' 		=> $studListValue['stud_no'],
								 'name' 		=> $studListValue['last_name'] . ', ' . $studListValue['first_name'] . ' ' . $studListValue['middle_name'],
								 'course_code'	=> $studListValue['course_code'],
								 'if_enroll'	=> $ifPaymentFull,
								 'section' 		=> ($takeSectionDesc['section_desc'] == '') ? '------------' : $takeSectionDesc['section_desc'],
								 'numbering'	=> $numCount.'.',
								));
								
			$TEMP->parse('studentsRow', 'students', true);
			$bgcolor = ($bgcolor == LOOPING_F0F) ? LOOPING_FFF : LOOPING_F0F;
			$numCount++;
		}
	}
	else {
		$TEMP->set_var(array('stud_id' 		=> '',
							 'stud_no' 		=> '',
							 'name' 		=> '',
							 'course_code'	=> '',
							 'if_enroll'	=> '',
							 'section' 		=> '',
							 'numbering'	=> '',
							 'sy_label'		=> '',
							));
	}
	$TEMP->set_var(array('sy_label'	=> $__SYR__));
	
?>